<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
      .top {
          margin: 0 auto;
          width: 1000px;
          /*父级标签高度为0，子级标签浮动，会影响到布局*/
          /*height: 300px;*/
          background-color: pink;
      }
      .left{
          float: left;
          width: 200px;
          height: 300px;
          background-color: green;
      }
      .right{
          float: right;
          width: 790px;
          height: 300px;
          background-color: red;
      }

      .bottom {
          width: 100%;
          height: 100px;
          background-color: black;
      }
  </style>
</head>
<body>
<!--父子级标签，父级没有高度，子级浮动，后面的标准流会受到影响-->
<div class="top">
    <div class="left"></div>
    <div class="right"></div>
<!--    解决浮动标签影响方法1：clear: both-->
    <div style="clear: both"></div>
</div>
<div class="bottom"></div>
</body>
</html>